from apps.vadmin.op_drf.models import BaseModel
from django.db.models import CharField, TextField, IntegerField, BooleanField


class All_Kq_Infos(BaseModel):
    compName = CharField(max_length=255, verbose_name='公司名称')
    compOwner = CharField(max_length=255, verbose_name='公司法人')
    opStatus = CharField(max_length=255, verbose_name='经营状态')
    empNum = IntegerField(verbose_name='参保人数')
    province = CharField(max_length=255, verbose_name='省份')
    city = CharField(max_length=255, verbose_name='地市')
    district = CharField(max_length=255, verbose_name='区县')
    address = CharField(max_length=255, verbose_name='地址')
    street = CharField(max_length=125, verbose_name='街道/乡镇', blank=True, null=True)
    businessScope = TextField(verbose_name='经营范围')
    regCap = IntegerField(verbose_name='注册资本', default=0, blank=True)
    realCap = IntegerField(verbose_name='实缴资本', default=0, blank=True)
    foundDay = CharField(max_length=255, verbose_name='成立日期', blank=True, null=True)
    compType = CharField(max_length=255, verbose_name='公司类型', blank=True, null=True)
    industry = CharField(max_length=255, verbose_name='所属行业', blank=True, null=True)
    oldName = CharField(max_length=255, verbose_name='曾用名', blank=True, null=True)
    phone = CharField(max_length=255, verbose_name='联系电话', blank=True, null=True)
    otherPhone = CharField(max_length=255, verbose_name='其他电话', blank=True, null=True)
    url = CharField(max_length=255, verbose_name='网址', blank=True, null=True)
    email = CharField(max_length=255, verbose_name='邮箱', blank=True, null=True)
    isMyCustomer = BooleanField(verbose_name="是否是我的客户", default=False, null=True)
    isDeleted = BooleanField(verbose_name="是否已经删除", default=False, null=True)
    collaborator = CharField(max_length=16, verbose_name='配套事业部合作人员', blank=True, null=True)
    collDepartment = CharField(max_length=16, verbose_name='配套事业部合作部门', blank=True, null=True)
    classify = CharField(max_length=16, verbose_name='行业分类', blank=True, null=True)
    businessProgress = CharField(max_length=255, verbose_name='拜访进度', blank=True, null=True)
    customRank = CharField(max_length=32, verbose_name='客户优先级',  blank=True, null=True)

    class Meta:
        verbose_name = '凯泉所有客户信息'
        verbose_name_plural = verbose_name

    def __str__(self):
        return f"{self.compName}"
